<!-- 1 定义组件模版 --> 
<template>
    <div class="childComponent">
 
         我是子元素
 
        <div>父亲给子元素车的：{{ car }}</div>
        <div>父亲给子元素压岁钱的：{{money }}</div>
        
        <div>user:: username:{{ username }}  password:{{ password }} ,{{ address }}</div>
        <button @click="toggle()">toggle</button>
 
    </div>
 </template> 
 
 <!-- 2 定义组件逻辑 -->
 <script setup lang="ts" name="Child"> 
 import { ref   } from 'vue'	
 const {toggle } = defineProps(["car","toggle","money","username","password","address"])		
 
 
 
 </script> 
  
 <!-- 3 定义样式 -->
 <style scoped> 
  
 </style>